package edu.zut.hb.software.master.service.impl;


import edu.zut.hb.software.base.service.impl.GenericTreeManagerImpl;
import edu.zut.hb.software.master.domain.MasterGroup;
import edu.zut.hb.software.master.service.MasterGroupService;
import edu.zut.hb.software.master.dao.MasterGroupDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;
import java.util.ArrayList;
import java.util.List;

@Service
@Transactional
public class MasterGroupServiceImpl extends GenericTreeManagerImpl<MasterGroup, Long>
        implements MasterGroupService {


	MasterGroupDao masterGroupDao;

    @Autowired
    public void MasterGroupDao(MasterGroupDao masterGroupDao) {
        this.masterGroupDao = masterGroupDao;
        this.treeDao=masterGroupDao;
        this.dao=treeDao;
    }

    @Override
        public List list() {
            List list = new ArrayList();
            for (int i = 0; i < 100; i++) {
            	MasterGroup masterGroup = new MasterGroup();
            	masterGroup.setName("名称"+i);
            	masterGroup.setAddress("地址"+i);
            	masterGroup.setPhone("号码"+i);
                list.add(masterGroup);
            }
            return list;

        }




}
